package lingou.homework.postbar.domain.enums;

public enum UserTypeEnum {
    STUDENT(0, "学生"), TEACHER(1, "教师"), MANAGER(2, "");
    private long id;
    private String typeName;
    UserTypeEnum(long id, String typeName) {
        this.id = id;
        this.typeName = typeName;
    }
    public long getId(){
        return this.id;
    }
    public String getTypeName(){
        return this.typeName;
    }
    public static UserTypeEnum select(long id){
        for (UserTypeEnum value : values()) {
            if(value.id == id) return value;
        }
        return null;
    }
}
